<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name='format-detection' content='telephone=no' />
<title>人车人</title>
<link rel="icon" href="/assets/img/titleico.ico" type="image/x-icon">
<link rel="stylesheet" href="/assets/css/common.css" />
<link rel="stylesheet" href="/assets/css/iconfont/iconfont.css" />
<link rel="stylesheet" href="/assets/css/product.css" />

<div id="banner">
    <div id="goback">
        <i class="inlineBlockImg"></i>
    </div>
</div>

<section id="list">
    <ul>
        <!-- <li>
            <div class="listTop">
                <p class="productTip">明云车抵融</p><span class="productTitle">【明云租赁】</span>
            </div>
            <div class="listMiddle">
                <div class="listMiddle_text">
                    <ul>
                       <li>
                           <span class="dataTip">借款额度：</span>
                           <span class="data_ed">5-20万</span>
                       </li>
                        <li>
                            <span class="dataTip">借款额度：</span>
                            <span class="data_lv">5-20万</span>
                        </li>
                    </ul>
                    <ul class="listMiddle_textTip">
                        <li class="data_adv">先息后本</li>
                        <li class="data_adv">6期</li>
                        <li class="data_adv">先息后本</li>
                    </ul>
                </div>
                <div class="listMiddle_btn">
                    <img src="/assets/img/likeshenqing-gongsichanpin@2x.png" alt="">
                </div>
            </div>
            <div class="listBottom">
                <p class="listBottom_text">已有56986人成功申请</p>
                <p class="listBottom_text">查看详情<i class="inlineBlockImg listBottom_logo"></i></p>
            </div>
            <div class="listLogo">
                <img src="/assets/img/xiaozhuangshi-tubiao-gonsichanpin@2x.png" alt="">
            </div>
        </li> -->
    </ul>
</section>


<script src="/assets/js/jquery-3.1.1.min.js"></script>
<script src="/assets/js/fastclick.min.js"></script>
<script src="/assets/js/xxsg.js"></script>
<script src="/assets/js/swiper-3.4.2.jquery.min.js"></script>
<script type="text/javascript">
	$(function(){
		$.ajax({
			url:'/product/getProduct',
			type:'get',
			success:function(data){
				//console.log(data);
				var productHTML = '';
				for(var i=0;i<data.length;i++){
					productHTML += `
					<li>
			            <div class="listTop">
			                <p class="productTip">${data[i].product}车抵融</p><span class="productTitle">【${data[i].product}租赁】</span>
			            </div>
			            <div class="listMiddle">
			                <div class="listMiddle_text">
			                    <ul>
			                       <li>
			                           <span class="dataTip">借款额度：</span>
			                           <span class="data_ed">${data[i].moneyMin}-${data[i].moneyMax}万</span>
			                       </li>
			                        <li>
			                            <span class="dataTip">参考利率：</span>
			                            <span class="data_lv">${data[i].rate}</span>
			                        </li>
			                    </ul>
			                    <ul class="listMiddle_textTip">
			                        <li class="data_adv">${data[i].returnType}</li>
			                        <li class="data_adv">${data[i].cycle}</li>
			                        <li class="data_adv">${data[i].fee}手续费</li>
			                    </ul>
			                </div>
			                <div class="listMiddle_btn" data_typeID='${data[i].productID}'>
			                    <img src="/assets/img/likeshenqing-gongsichanpin@2x.png" alt="">
			                </div>
			            </div>
			            <div class="listBottom">
			                <p class="listBottom_text">已有56986人成功申请</p>
			                <p class="listBottom_text" data_typeID='${data[i].productID}'>查看详情<i class="inlineBlockImg listBottom_logo"></i></p>
			            </div>
			            <div class="listLogo">
			                <img src="/assets/img/xiaozhuangshi-tubiao-gonsichanpin@2x.png" alt="">
			            </div>
			        </li>
					`;
				}
				$('#list>ul').html(productHTML);
			}
		})
		
		$('#list>ul').on('click','div.listMiddle_btn',function(e){
			e.stopPropagation();
			//console.log( $(this).attr('data_typeID') );
			window.sessionStorage['productID'] = $(this).attr('data_typeID');
			window.location.href='/product/productDetail';
		})
		$('#list>ul').on('click','div.listBottom p[data_typeID]',function(e){
			e.stopPropagation();
			//console.log( $(this).attr('data_typeID') );
			window.sessionStorage['productID'] = $(this).attr('data_typeID');
			window.location.href='/product/productDetail';
		})
	})

</script>
</body>
</html>